//
//  MASConstraint+SS.m
//  Interesting
//
//  Created by point on 2018/2/8.
//  Copyright © 2018年 whiteboard. All rights reserved.
//

#define ScreenWidth [UIScreen mainScreen].bounds.size.width
#define FIT_LENGTH(x)  x * ScreenWidth / 375.f


#import "MASConstraint+SS.h"

@implementation MASConstraint (SS)

- (MASConstraint * (^)(CGFloat))sOffset {
    return ^id(CGFloat offset){
      
        self.offset = FIT_LENGTH(offset);
       //NSLog(@"%f",FIT_LENGTH(offset));
        return self;
    };
}

- (MASConstraint * (^)(MASEdgeInsets))sInsets {
    return ^id(MASEdgeInsets insets){
        self.insets = UIEdgeInsetsMake(FIT_LENGTH(insets.top), FIT_LENGTH(insets.left), FIT_LENGTH(insets.bottom), FIT_LENGTH(insets.right));
        return self;
    };
}

@end
